<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!--引入head的公共部分-->
<head th:replace="header::header-commo(付款)"></head>
<body>
<!--引入header的公共部分-->
<header th:replace="header::header-nav"></header>
<div class="container" style="margin-top: 20px;">
    <div class="list-group">
        <h3 class="list-group-item-heading">生成订单成功：<span th:text="${order.oid}"></span></h3>
        <div class="list-group-item">
            <table class="table table-condensed">
                <thead>
                <tr>
                    <th>图片</th>
                    <th>商品</th>
                    <th>单价(元)</th>
                    <th>数量</th>
                    <th>小计</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="orderItem:${order.orderItems}">
                    <td><img th:src="@{'/upload/'+${orderItem.item.image}}" src="images/1big.jpg" class="buyimg"/></td>
                    <td th:text="${orderItem.item.name}">提莫 手办</td>
                    <td th:text="'¥'+${orderItem.item.shopPrice}">¥150.00</td>
                    <td th:text="${orderItem.count}">1</td>
                    <td th:text="'¥'+${orderItem.subtotal}">¥150.00</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="text-right list-group-item" style=" margin-bottom: 10px;">
            商品金额：¥<span class="xiangq_font3" th:text="'¥'+${order.total}+'元'">300.00元</span>
        </div>
        <form class="form-horizontal list-group-item" method="post" th:action="@{/pay/order}">
            <input type="hidden" name="WIDout_trade_no" th:value="${order.oid}">
            <input type="hidden" name="WIDtotal_amount" th:value="${order.total}">
            <h3 class="list-group-item-heading">配送至:</h3>
            <div class="form-group">
                <label for="username" class="col-sm-1 control-label">收货地址:</label>
                <div class="col-sm-3">
                    <input type="text" name="address" class="form-control" >
                </div>
            </div>
            <div class="form-group">
                <label for="username" class="col-sm-1 control-label">收货人:</label>
                <div class="col-sm-2">
                    <input type="text" name="name" class="form-control" >
                </div>
            </div>
            <div class="form-group">
                <label for="username" class="col-sm-1 control-label">联系方式:</label>
                <div class="col-sm-3">
                    <input type="text" name="telephone" class="form-control" id="username">
                </div>
            </div>
            <div class="form-group">
                <label for="username" class="col-sm-1 control-label">支付方式:</label>
                <div class="col-md-3 ">
                    <input type="submit" class="btn btn-success btn-lg" value="支付宝支付">
                </div>
            </div>
        </form>

    </div>

    <div class="list-group">

    </div>
</div>
<!--底部-->
<footer th:replace="footer::footer"></footer>
</body>
</html>